#define _CRT_SECURE_NO_WARNINGS

#include <stdio.h>
#include <stdlib.h>
#include <assert.h>


typedef int DLtype;

typedef struct DListNode
{
	struct DListNode* prev;
	DLtype data;
	struct DListNode* next;
}DL;

DL* BuyDL(DLtype x);
DL* DLInit();

void DLPushBack(DL* phead, DLtype x);
void DLPopBack(DL* phead);

void DLPushFront(DL* phead, DLtype x);
void DLPopFront(DL* phead);